import threading
import time
import multiprocessing

def demo01():
    while True:
        print("demo1")
        time.sleep(1)

def demo02():
    while True:
        print("demo2")
        time.sleep(1)

def main():
    # t1 = threading.Thread(target=demo01)
    # t2 = threading.Thread(target=demo02)
    # t1.start()
    # t2.start()
    t1 = multiprocessing.Process(target=demo01)
    t2 = multiprocessing.Process(target=demo02)
    t1.start()
    t2.start()

if __name__ == '__main__':
    main()